package com.bling.common.bean;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
 * 配置表单和字段之间的关系
 * 供用户发布信息显示不同表单使用
 * @author BLingSoft
 *
 */
@Entity
@Table(name="T_FORMFIELD")
public class FormField implements Serializable {

	private static final long serialVersionUID = -612332564576742454L;

	private Integer id; //主键
	private Integer formid; // 表单主键
	private Integer fieldid; // 字段主键
	private Integer sort; // 排序
	
	private Field field; // 每个字段

	public FormField() {
		super();
	}

	public FormField(Integer formid, Integer fieldid, Integer sort, Field field) {
		super();
		this.formid = formid;
		this.fieldid = fieldid;
		this.sort = sort;
		this.field = field;
	}

	@Id
	@GeneratedValue
	@Column
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column
	public Integer getFormid() {
		return formid;
	}

	public void setFormid(Integer formid) {
		this.formid = formid;
	}

	@Column
	public Integer getFieldid() {
		return fieldid;
	}

	public void setFieldid(Integer fieldid) {
		this.fieldid = fieldid;
	}

	@Column
	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	@Transient
	public Field getField() {
		return field;
	}

	public void setField(Field field) {
		this.field = field;
	}
}
